use nacos_rust_client::client::naming_client::NamingClient;
use std::sync::Arc;
use utils::nacos_config::{NacosRegistry, presets};

pub fn register_service() -> Result<(), Box<dyn std::error::Error>> {
    let registry = NacosRegistry::with_default("system-service");
    let service_config = presets::system_service();
    
    registry.register_service(&service_config)
}

pub fn create_naming_client() -> Arc<NamingClient> {
    let registry = NacosRegistry::with_default("system-service-client");
    registry.get_naming_client()
}
